﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
//using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RainmeterCustomized
{
    public partial class InputBoxForm : Form
    {
        public InputBoxForm()
        {
            InitializeComponent();
        }

        private String returnValue;

        public String Value
        {
            set { this.nameTb.Text = value; }
            get { return returnValue; }
        }

        private void okBt_Click(object sender, EventArgs e)
        {
            returnValue = this.nameTb.Text;
            Close();
        }

        private void cancelBt_Click(object sender, EventArgs e)
        {
            returnValue = null;
            Close();
        }

        private void nameTb_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                okBt.PerformClick();
            }
        }

    }
}
